package com.holystone.splunk.common;

/**
 * Copyright (c) 2017, HOLYSTONE Technologies, Inc.
 * All right reserved.
 *
 * @author huyan
 * @date 2017/10/11
 * @desc:
 */
public class SystemConstant {

    //-------------------Response Code-------------------
    /**
     * 请求返回码
     * 200 正常成功返回
     * 201 正常成功返回但没有数据
     * 202 资源不存在
     * 500 错误返回  controller try catch 异常返回
     */
    public static final String RESPONSE_CODE_SUCCESS = "200";

    public static final String RESPONSE_CODE_SUCCESS_NULL_COMTENT = "201";

    public static final String RESPONSE_CODE_RESOURCE_NOT_EXISTS = "202";

    public static final String RESPONSE_CODE_FAILURE = "500";


    //-------------------- 默认的分页属性 ----------------------
    public static final Integer DEFAULT_PAGE_NUM = 1;
    public static final Integer DEFAULT_PAGE_SIZE = 15;

    //--------------- 将所有信息存入Splunk中标识----------------------
    // 库
    public static final String SPLUNK_INDEX = "event_alert_index";

    // 表
    public static final String SOURCETYPE_ALERT = "alert";
    public static final String SOURCETYPE_EVENT = "event";

    public static final String ALERT_MD5 = "r_md5";
    public static final String ALERT_SEARCH = "r_search";

    // 告警结果的最大长度，超过了就不存
    public static final int MAX_SIZE = 5000;
    public static final String MAX_RESULT = "MAX";
}
